<?php
namespace app\common\process;

class Version extends Base {
	//获取app最新版本信息
    public function new() {
        $model = loader('app')->loadModel('Version');
        $request = loader('app')->loadAny('request', 'Version');
        $post = $request->new();
        loader('app')->loadAny('search', 'Version')->new($model, $post);
        $row = $model->order('newversion desc')->find();
        if($row) {
            $row['fulldownloadurl'] = $request->domain() . $row['downloadurl'];
        }
        return $row;
    }
}
